import java.util.*;

public class Main
{
    public static void main(String []args)
    {
	try
	{
	    Scanner in = new Scanner(System.in);
	    Random rnd = new Random();
	    int N = in.nextInt();
	    double A_first[] = new double[2 * N - 1];
	    double A[] = new double [N + 1];
	    for (int i = 0; i < 2 * N - 1; ++i)
		A_first[i] = rnd.nextDouble();
	    for(int i = 1; i < N; ++i)
		A[i] = A_first[N - 1 + i];
	    A[0] = 0;
	    A[N] = 1;
	    Arrays.sort(A);
	    double multiply = 0.0;
	    for (int i = 0; i < N; ++i)
		multiply += Math.log(A_first[i]);
	    double Exp[] = new double [N];
	    for (int i = 0; i < N; ++i)
		Exp[i] = (A[i] - A[i + 1]) * multiply;
	    double d = 0, e = 0;
	    for (double x: Exp)
		e += x;
	    e /= N;
	    for (double x: Exp)
		d += Math.pow(e - x, 2.0);
	    d /= (N - 1);
	    System.out.println(e + "\t" + d);

	}
	catch(Throwable e){System.out.println(e.getMessage());}
    }

}